package com.jx.servicrimpl;

import com.jx.dao.FindSomeFuncsDao;
import com.jx.daoimpl.FindSomeFuncsDaoImpl;
import com.jx.service.FindSomeFuncsService;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class FindSomeFuncsServiceImpl implements FindSomeFuncsService{
	/**
	 * 模糊查询搜索的功能
	 * @author zzzzzzz
	 *
	 */
	FindSomeFuncsDao fsfd=new FindSomeFuncsDaoImpl();
	@Override
	public JSONObject findSomeFuncsService(String fname,int start,int pagesize) {
		// TODO Auto-generated method stub
		JSONObject json=new JSONObject();
		//分页
		json.put("total", fsfd.findTotalFuncs(fname));
		json.put("rows",JSONArray.fromObject(fsfd.findSomeFuncsDao(fname,start,pagesize)));
		return json;
	}

}
